<style>
#paketEditContainer{
	width:600px;
}
#paketEditContainer label{
	width:40px;
}
#paketEditContainer label input{
	background-color:transparent;
	border:none;
	margin:2px 0px;
	padding:0px;
	width:16px;
	float:right;
	cursor:pointer;
}
#paketEditContainer input#updateCenaPaket{
	padding:0px;
	display:none;
	background:#CC2420;
	border-color:#CC2420;
	color:#fff;
}
#paketEditContainer input[type=submit]{
	float:right;
}
#paketEditContainer #edit_paket_name,
#paketEditContainer textarea{
	width:358px;
}
#paketEditContainer #cenovnikDisplay{
	float:left;
	color:#aaa;
	font-size:11px;
	margin:7px 7px 7px 20px;
}
#paketEditContainer #paket_sadrzaj_container{
	float:left;
	background:#d7d4a1;
	border:1px inset #d7d4a1;
	padding:0px;
	margin:5px;
}
#paketEditContainer ul.paket_artikli{
	float:left;
	margin:0px;
	padding:0px;
	list-style-type:none;
}
#paketEditContainer ul.paket_artikli li{
	float:left;
	clear:both;
}
#paketEditContainer ul.paket_artikli li input[type=button]{
	background-color:transparent;
	border:none;
	margin:7px 5px;
	padding:0px;
	width:16px;
	cursor:pointer;
}
#paketEditContainer ul.paket_artikli li input[type=button]:hover{
	background-color:#fff;
}
#paketEditContainer ul.paket_artikli li input[type=text]{
	text-align:right;
}
#paketEditContainer ul.paket_artikli li span{
	display:block;
	float:left;
	margin:8px 2px;
}
</style>
<div id="paketEditContainer" class="area">
	<form action="javascript:void(0)"; onsubmit="artikliPaketiSave(this)">
		<h2>Izmena paketa #{{$paket_id}}</h2>
		
		<input type="hidden" name="a" value="artikli_paketi" />
		<input type="hidden" name="mod" value="save" />
		<input type="hidden" name="paket_id" value="{{$paket_id}}" />
		
		<label class="left" for="edit_paket_name">Naziv:</label><input type="text" name="edit_paket_name" id="edit_paket_name" value="{{$paket_name}}" /><br clear="all" />
		
		<label class="left" for="edit_paket_start">Od:</label><input onchange="this.value=trim(this.value); LoadRSDoc('artikli.php?a=artikli_paketi&mod=reloadCene&datum='+this.value,'afterChangePaketDatum')" style="width:60px" type="text" name="edit_paket_start" id="edit_paket_start" value="{{$paket_start}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker('edit_paket_start',this)" />
		<label style="margin-left:5px; width:auto;" class="left" for="edit_paket_end">Do:</label><input onchange="this.value=trim(this.value)" style="width:60px" type="text" name="edit_paket_end" id="edit_paket_end" value="{{$paket_end}}" />
		<input type="button" class="datePicker" onclick="displayDatePicker('edit_paket_end',this)" />
		<span id="cenovnikDisplay">Cenovnik:&nbsp;{{$cenovnik_datum}}</span>
		<br clear="all" />
		
		<label class="left" for="edit_paket_price">Cena:</label><input type="text" name="edit_paket_price" id="edit_paket_price" value="{{$paket_price}}" />
		<input type="button" id="updateCenaPaket" onclick="var val=this.value.replace(/^<< /,''); this.previousSibling.previousSibling.value=trim(val); this.style.display='none'" value="" />
		<br clear="all" />
		<label class="left">
			Artikli:
			<input type="button" class="novi" onclick="artikliPaketiAddStavka()" />
		</label>
		<div id="paket_sadrzaj_container">
			<ul id="edit_paket_artikli" class="paket_artikli">
				{{%loop start pakart_id}}
				<li title="Iznos stavke: {{$pakart_iznos}}" iznos="{{$pakart_iznos_float}}">
					<select onchange="updateStavkaPrice(this)">
						{{$pakart_cene_options}}
					</select>
					<span>popust</span>
					<input onchange="updateStavkaPrice(this)" type="text" style="width:40px" value="{{$pakart_popust}}" />
					<input type="button" class="delete" onclick="var lis=this.parentNode.parentNode.getElementsByTagName('li'); if(lis.length>1 && confirm('Potvrdite brisanje stavke paketa.')){this.parentNode.parentNode.removeChild(this.parentNode)}" />
				</li>
				{{%loop end}}
			</ul>
		</div><br clear="all" />
		<label class="left" for="edit_paket_desc">Opis:</label><textarea name="edit_paket_desc" id="edit_paket_desc">{{$paket_desc}}</textarea>
		
		<br clear="all" />
		<input type="submit" value="sačuvaj" class="save" />
	</form>
	<pre style="clear:both">{{$info}}</pre>
</div>